//
//  ViewController.h
//  SerialPort
//
//  Created by MT-SW-003 on 2021/4/9.
//  Copyright © 2021 MT-SW-003. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface ViewController : NSViewController

@property (weak) IBOutlet NSComboBox *serialDevicePath;

@property (weak) IBOutlet NSComboBox *baudRateSelector;
@property (weak) IBOutlet NSComboBox *dataBitSelector;
@property (weak) IBOutlet NSComboBox *stopBitSelector;
@property (weak) IBOutlet NSComboBox *paritySelector;
@property (weak) IBOutlet NSButton *openSerialButton;
@property (weak) IBOutlet NSButton *closeSerialButton;

@property (unsafe_unretained) IBOutlet NSTextView *terminalLog;


@property (weak) IBOutlet NSTextField *sendTextView;
@property (weak) IBOutlet NSButton *sendTextButton;

@property (weak) IBOutlet NSButton *sendASCIICheckButton;
@property (weak) IBOutlet NSButton *sendHEXCheckButton;
@property (weak) IBOutlet NSButton *readASCIICheckbutton;
@property (weak) IBOutlet NSButton *readHEXCheckButton;


@property (weak) IBOutlet NSButton *cleanInputBuffButton;
@property (weak) IBOutlet NSButton *cleanReadBuffButton;

- (IBAction)openSerial:(id)sender;
- (IBAction)closeSerial:(id)sender;
- (IBAction)sendText:(id)sender;
- (IBAction)cleanTerminal:(id)sender;
- (IBAction)cleanSendText:(id)sender;

- (IBAction)sendASCIIcheck:(id)sender;
- (IBAction)sendHEXcheck:(id)sender;
- (IBAction)cleanInputBuff:(id)sender;

- (IBAction)readASCIIcheck:(id)sender;
- (IBAction)readHEXcheck:(id)sender;
- (IBAction)cleanReadBuff:(id)sender;
@property (weak) IBOutlet NSButton *autoSavelogBtn;
@property (weak) IBOutlet NSButton *saveLogBtn;
@property (weak) IBOutlet NSButton *addEndMarkBtn;
@property (weak) IBOutlet NSPopUpButton *endMarkCK;
@property (weak) IBOutlet NSButton *timerBtn;
@property (weak) IBOutlet NSTextField *timerText;



@end


